//package cn.autumnorange.authorization.security.security;
//
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.security.config.annotation.web.builders.HttpSecurity;
//import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
//import org.springframework.security.crypto.password.PasswordEncoder;
//import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer;
//import org.springframework.security.oauth2.config.annotation.web.configuration.ResourceServerConfigurerAdapter;
//
//@Configuration
//@EnableResourceServer
//public class ResourceServerConfig extends ResourceServerConfigurerAdapter {
//
//    @Bean
//    public PasswordEncoder passwordEncoder() {
//        return new BCryptPasswordEncoder();
//    }
//
//    @Override
//    public void configure(HttpSecurity http) throws Exception {
//        http.formLogin()
////                .
////                loginPage("/authentication/require")
//                .loginProcessingUrl("/authentication/form")
//                .and().authorizeRequests()
//                .antMatchers(
////                        "/authentication/require",
//                        "/authentication/form",
//                        "/**/*.js",
//                        "/**/*.css",
//                        "/**/*.jpg",
//                        "/**/*.png",
//                        "/**/*.woff2", "/error", "/index.html", "/static/**", "/sysUser/**", SecurityConstants.DEFAULT_SOCIAL_PROCESS_URL,
//                        SecurityConstants.FAVICON_ICO, SecurityConstants.STATICRESOURCES,
//                        "/**/*.js",
//                        "/**/*.css",
//                        "/**/*.jpg",
//                        "/**/*.jpeg",
//                        "/**/*.png",
//                        "/**/*.woff2",
//                        "/code/*"
//                )
//                .permitAll()
//                .anyRequest().authenticated()
//                .and()
//                .csrf().disable();
//    }
//}
